<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Class template independent_bits_engine</title>
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../../boost_random/reference.html#doxygen.headers.independent__bits_8hpp" title="Header &lt;boost/random/independent_bits.hpp&gt;">
<link rel="prev" href="classboost_1_1random_1_1hyperexponential__distribution_1_1param__type.html" title="Class param_type">
<link rel="next" href="classboost_1_1random_1_1inversive__congruential__engine.html" title="Class template inversive_congruential_engine">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
<td align="center"><a href="../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="classboost_1_1random_1_1hyperexponential__distribution_1_1param__type.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../boost_random/reference.html#doxygen.headers.independent__bits_8hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="classboost_1_1random_1_1inversive__congruential__engine.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="doxygen.headers.classboost_1_1random_1_1independent__bits__engine"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class template independent_bits_engine</span></h2>
<p>boost::random::independent_bits_engine</p>
</div>
<h2 class="refsynopsisdiv-title">Synopsis</h2>
<div class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../boost_random/reference.html#doxygen.headers.independent__bits_8hpp" title="Header &lt;boost/random/independent_bits.hpp&gt;">boost/random/independent_bits.hpp</a>&gt;

</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Engine<span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> w<span class="special">,</span> <span class="keyword">typename</span> UIntType<span class="special">&gt;</span> 
<span class="keyword">class</span> <a class="link" href="classboost_1_1random_1_1independent__bits__engine.html" title="Class template independent_bits_engine">independent_bits_engine</a> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
  <span class="comment">// types</span>
  <span class="keyword">typedef</span> <span class="identifier">Engine</span>              <a name="doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1a3dcc94ccf45be06e100e4f9344cca226"></a><span class="identifier">base_type</span><span class="special">;</span>       
  <span class="keyword">typedef</span> <span class="identifier">UIntType</span>            <a name="doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1ab707c8c58453ca4f96d28282c12572a2"></a><span class="identifier">result_type</span><span class="special">;</span>     
  <span class="keyword">typedef</span> <span class="identifier">Engine</span><span class="special">::</span><span class="identifier">result_type</span> <a name="doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1a5cd75f80f31d17af6189cec901eb4839"></a><span class="identifier">base_result_type</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="classboost_1_1random_1_1independent__bits__engine.html#id-1_3_32_5_6_20_1_1_1_7-bb">public static functions</a></span>
  <span class="keyword">static</span> <span class="identifier">result_type</span> <a class="link" href="classboost_1_1random_1_1independent__bits__engine.html#doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1a5ac02bfca124e1690f02589a528bbcee"><span class="identifier">min</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="identifier">result_type</span> <a class="link" href="classboost_1_1random_1_1independent__bits__engine.html#doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1aa810e9f67b52eceb84e1904d25327eae"><span class="identifier">max</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="classboost_1_1random_1_1independent__bits__engine.html#id-1_3_32_5_6_20_1_1_1_8-bb">public member functions</a></span>
  <a class="link" href="classboost_1_1random_1_1independent__bits__engine.html#doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1a505e2a187367307c58129f14dddfbcbf"><span class="identifier">independent_bits_engine</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">explicit</span> <a class="link" href="classboost_1_1random_1_1independent__bits__engine.html#doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1a7032f006a2629f996a0c0363efcb0480"><span class="identifier">independent_bits_engine</span></a><span class="special">(</span><span class="identifier">base_result_type</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> SeedSeq<span class="special">&gt;</span> <span class="keyword">explicit</span> <a class="link" href="classboost_1_1random_1_1independent__bits__engine.html#doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1a018dac6fd0427c37673876312082311e"><span class="identifier">independent_bits_engine</span></a><span class="special">(</span><span class="identifier">SeedSeq</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="classboost_1_1random_1_1independent__bits__engine.html#doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1a3c001453d3d687ce40a6ec43913f7e9d"><span class="identifier">independent_bits_engine</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">base_type</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> It<span class="special">&gt;</span> <a class="link" href="classboost_1_1random_1_1independent__bits__engine.html#doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1a472dc74603eb8275c1bf5c4457b68d36"><span class="identifier">independent_bits_engine</span></a><span class="special">(</span><span class="identifier">It</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">It</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1random_1_1independent__bits__engine.html#doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1add71dc930e19dab7c13d1d93d9b0d398"><span class="identifier">seed</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1random_1_1independent__bits__engine.html#doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1a05427d15647c2c9c47801df1a7e5b739"><span class="identifier">seed</span></a><span class="special">(</span><span class="identifier">base_result_type</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> SeedSeq<span class="special">&gt;</span> <span class="keyword">void</span> <a class="link" href="classboost_1_1random_1_1independent__bits__engine.html#doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1a0c7c7a5aef2b30df7379229abf879b57"><span class="identifier">seed</span></a><span class="special">(</span><span class="identifier">SeedSeq</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> It<span class="special">&gt;</span> <span class="keyword">void</span> <a class="link" href="classboost_1_1random_1_1independent__bits__engine.html#doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1ae6219552edde9c919d743a34fa9be9ed"><span class="identifier">seed</span></a><span class="special">(</span><span class="identifier">It</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">It</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">result_type</span> <a class="link" href="classboost_1_1random_1_1independent__bits__engine.html#doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1a491a9f367d4aae50b69d21546e45ab89"><span class="keyword">operator</span><span class="special">(</span><span class="special">)</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Iter<span class="special">&gt;</span> <span class="keyword">void</span> <a class="link" href="classboost_1_1random_1_1independent__bits__engine.html#doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1ac4b5539aa93637e89659d6d27a985e6a"><span class="identifier">generate</span></a><span class="special">(</span><span class="identifier">Iter</span><span class="special">,</span> <span class="identifier">Iter</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1random_1_1independent__bits__engine.html#doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1af64be62f5811be396be33128f74b3771"><span class="identifier">discard</span></a><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uintmax_t</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">const</span> <span class="identifier">base_type</span> <span class="special">&amp;</span> <a class="link" href="classboost_1_1random_1_1independent__bits__engine.html#doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1aad1b918a0d080ad453cdc45ad311394e"><span class="identifier">base</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="classboost_1_1random_1_1independent__bits__engine.html#id-1_3_32_5_6_20_1_1_1_9-bb">friend functions</a></span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> CharT<span class="special">,</span> <span class="keyword">typename</span> Traits<span class="special">&gt;</span> 
    <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special">&lt;</span> <span class="identifier">CharT</span><span class="special">,</span> <span class="identifier">Traits</span> <span class="special">&gt;</span> <span class="special">&amp;</span> 
    <a class="link" href="classboost_1_1random_1_1independent__bits__engine.html#doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1a17f8bef620bc88aed389cb42063cc7b5"><span class="keyword">operator</span><span class="special">&lt;&lt;</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special">&lt;</span> <span class="identifier">CharT</span><span class="special">,</span> <span class="identifier">Traits</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">,</span> 
               <span class="keyword">const</span> <a class="link" href="classboost_1_1random_1_1independent__bits__engine.html" title="Class template independent_bits_engine">independent_bits_engine</a> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> CharT<span class="special">,</span> <span class="keyword">typename</span> Traits<span class="special">&gt;</span> 
    <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_istream</span><span class="special">&lt;</span> <span class="identifier">CharT</span><span class="special">,</span> <span class="identifier">Traits</span> <span class="special">&gt;</span> <span class="special">&amp;</span> 
    <a class="link" href="classboost_1_1random_1_1independent__bits__engine.html#doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1a3b41869e6a87f3ff336b3421195966e5"><span class="keyword">operator</span><span class="special">&gt;&gt;</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_istream</span><span class="special">&lt;</span> <span class="identifier">CharT</span><span class="special">,</span> <span class="identifier">Traits</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">,</span> 
               <span class="keyword">const</span> <a class="link" href="classboost_1_1random_1_1independent__bits__engine.html" title="Class template independent_bits_engine">independent_bits_engine</a> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">bool</span> <a class="link" href="classboost_1_1random_1_1independent__bits__engine.html#doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1a75231dbd66015d3a5644a5ff56fae27a"><span class="keyword">operator</span><span class="special">==</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="classboost_1_1random_1_1independent__bits__engine.html" title="Class template independent_bits_engine">independent_bits_engine</a> <span class="special">&amp;</span><span class="special">,</span> 
                  <span class="keyword">const</span> <a class="link" href="classboost_1_1random_1_1independent__bits__engine.html" title="Class template independent_bits_engine">independent_bits_engine</a> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">bool</span> <a class="link" href="classboost_1_1random_1_1independent__bits__engine.html#doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1a91620cd2d6bfd236f946c372a0416564"><span class="keyword">operator</span><span class="special">!=</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="classboost_1_1random_1_1independent__bits__engine.html" title="Class template independent_bits_engine">independent_bits_engine</a> <span class="special">&amp;</span><span class="special">,</span> 
                  <span class="keyword">const</span> <a class="link" href="classboost_1_1random_1_1independent__bits__engine.html" title="Class template independent_bits_engine">independent_bits_engine</a> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>

  <span class="comment">// public data members</span>
  <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">bool</span> <span class="identifier">has_fixed_range</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id-1.3.32.5.6.19.3.4"></a><h2>Description</h2>
<p>An instantiation of class template <code class="computeroutput"><a class="link" href="classboost_1_1random_1_1independent__bits__engine.html" title="Class template independent_bits_engine">independent_bits_engine</a></code> model a  <a class="link" href="../../boost_random/reference.html#boost_random.reference.concepts.pseudo_random_number_generator" title="Pseudo-Random Number Generator">pseudo-random number generator</a> . It generates random numbers distributed between [0, 2^w) by combining one or more invocations of the base engine.</p>
<p>Requires: 0 &lt; w &lt;= std::numeric_limits&lt;UIntType&gt;::digits </p>
<div class="refsect2">
<a name="id-1.3.32.5.6.19.3.4.4"></a><h3>
<a name="id-1_3_32_5_6_20_1_1_1_7-bb"></a><code class="computeroutput">independent_bits_engine</code> public static functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="identifier">result_type</span> <a name="doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1a5ac02bfca124e1690f02589a528bbcee"></a><span class="identifier">min</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>Returns the smallest value that the generator can produce. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="identifier">result_type</span> <a name="doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1aa810e9f67b52eceb84e1904d25327eae"></a><span class="identifier">max</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>Returns the largest value that the generator can produce. </p>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="id-1.3.32.5.6.19.3.4.5"></a><h3>
<a name="id-1_3_32_5_6_20_1_1_1_8-bb"></a><code class="computeroutput">independent_bits_engine</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><a name="doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1a505e2a187367307c58129f14dddfbcbf"></a><span class="identifier">independent_bits_engine</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>Constructs an <code class="computeroutput"><a class="link" href="classboost_1_1random_1_1independent__bits__engine.html" title="Class template independent_bits_engine">independent_bits_engine</a></code> using the default constructor of the base generator. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">explicit</span> <a name="doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1a7032f006a2629f996a0c0363efcb0480"></a><span class="identifier">independent_bits_engine</span><span class="special">(</span><span class="identifier">base_result_type</span> seed<span class="special">)</span><span class="special">;</span></pre>
<p>Constructs an <code class="computeroutput"><a class="link" href="classboost_1_1random_1_1independent__bits__engine.html" title="Class template independent_bits_engine">independent_bits_engine</a></code>, using seed as the constructor argument for both base generators. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> SeedSeq<span class="special">&gt;</span> <span class="keyword">explicit</span> <a name="doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1a018dac6fd0427c37673876312082311e"></a><span class="identifier">independent_bits_engine</span><span class="special">(</span><span class="identifier">SeedSeq</span> <span class="special">&amp;</span> seq<span class="special">)</span><span class="special">;</span></pre>
<p>Constructs an <code class="computeroutput"><a class="link" href="classboost_1_1random_1_1independent__bits__engine.html" title="Class template independent_bits_engine">independent_bits_engine</a></code>, using seq as the constructor argument for the base generator. </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1a3c001453d3d687ce40a6ec43913f7e9d"></a><span class="identifier">independent_bits_engine</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">base_type</span> <span class="special">&amp;</span> base_arg<span class="special">)</span><span class="special">;</span></pre>
<p>Constructs an <code class="computeroutput"><a class="link" href="classboost_1_1random_1_1independent__bits__engine.html" title="Class template independent_bits_engine">independent_bits_engine</a></code> by copying <code class="computeroutput">base</code>. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> It<span class="special">&gt;</span> <a name="doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1a472dc74603eb8275c1bf5c4457b68d36"></a><span class="identifier">independent_bits_engine</span><span class="special">(</span><span class="identifier">It</span> <span class="special">&amp;</span> first<span class="special">,</span> <span class="identifier">It</span> last<span class="special">)</span><span class="special">;</span></pre>
<p>Contructs an <code class="computeroutput"><a class="link" href="classboost_1_1random_1_1independent__bits__engine.html" title="Class template independent_bits_engine">independent_bits_engine</a></code> with values from the range defined by the input iterators first and last. first will be modified to point to the element after the last one used.</p>
<p>Throws: <code class="computeroutput">std::invalid_argument</code> if the input range is too small.</p>
<p>Exception Safety: Basic </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1add71dc930e19dab7c13d1d93d9b0d398"></a><span class="identifier">seed</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>Seeds an <code class="computeroutput"><a class="link" href="classboost_1_1random_1_1independent__bits__engine.html" title="Class template independent_bits_engine">independent_bits_engine</a></code> using the default seed of the base generator. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1a05427d15647c2c9c47801df1a7e5b739"></a><span class="identifier">seed</span><span class="special">(</span><span class="identifier">base_result_type</span> seed<span class="special">)</span><span class="special">;</span></pre>
<p>Seeds an <code class="computeroutput"><a class="link" href="classboost_1_1random_1_1independent__bits__engine.html" title="Class template independent_bits_engine">independent_bits_engine</a></code>, using <code class="computeroutput">seed</code> as the seed for the base generator. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> SeedSeq<span class="special">&gt;</span> <span class="keyword">void</span> <a name="doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1a0c7c7a5aef2b30df7379229abf879b57"></a><span class="identifier">seed</span><span class="special">(</span><span class="identifier">SeedSeq</span> <span class="special">&amp;</span> seq<span class="special">)</span><span class="special">;</span></pre>
<p>Seeds an <code class="computeroutput"><a class="link" href="classboost_1_1random_1_1independent__bits__engine.html" title="Class template independent_bits_engine">independent_bits_engine</a></code>, using <code class="computeroutput">seq</code> to seed the base generator. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> It<span class="special">&gt;</span> <span class="keyword">void</span> <a name="doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1ae6219552edde9c919d743a34fa9be9ed"></a><span class="identifier">seed</span><span class="special">(</span><span class="identifier">It</span> <span class="special">&amp;</span> first<span class="special">,</span> <span class="identifier">It</span> last<span class="special">)</span><span class="special">;</span></pre>
<p>Seeds an <code class="computeroutput"><a class="link" href="classboost_1_1random_1_1independent__bits__engine.html" title="Class template independent_bits_engine">independent_bits_engine</a></code> with values from the range defined by the input iterators first and last. first will be modified to point to the element after the last one used.</p>
<p>Throws: <code class="computeroutput">std::invalid_argument</code> if the input range is too small.</p>
<p>Exception Safety: Basic </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">result_type</span> <a name="doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1a491a9f367d4aae50b69d21546e45ab89"></a><span class="keyword">operator</span><span class="special">(</span><span class="special">)</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>Returns the next value of the generator. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Iter<span class="special">&gt;</span> <span class="keyword">void</span> <a name="doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1ac4b5539aa93637e89659d6d27a985e6a"></a><span class="identifier">generate</span><span class="special">(</span><span class="identifier">Iter</span> first<span class="special">,</span> <span class="identifier">Iter</span> last<span class="special">)</span><span class="special">;</span></pre>
<p>Fills a range with random values </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1af64be62f5811be396be33128f74b3771"></a><span class="identifier">discard</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uintmax_t</span> z<span class="special">)</span><span class="special">;</span></pre>
<p>Advances the state of the generator by <code class="computeroutput">z</code>. </p>
</li>
<li class="listitem"><pre class="literallayout"><span class="keyword">const</span> <span class="identifier">base_type</span> <span class="special">&amp;</span> <a name="doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1aad1b918a0d080ad453cdc45ad311394e"></a><span class="identifier">base</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
</ol></div>
</div>
<div class="refsect2">
<a name="id-1.3.32.5.6.19.3.4.6"></a><h3>
<a name="id-1_3_32_5_6_20_1_1_1_9-bb"></a><code class="computeroutput">independent_bits_engine</code> friend functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> CharT<span class="special">,</span> <span class="keyword">typename</span> Traits<span class="special">&gt;</span> 
  <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special">&lt;</span> <span class="identifier">CharT</span><span class="special">,</span> <span class="identifier">Traits</span> <span class="special">&gt;</span> <span class="special">&amp;</span> 
  <a name="doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1a17f8bef620bc88aed389cb42063cc7b5"></a><span class="keyword">operator</span><span class="special">&lt;&lt;</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special">&lt;</span> <span class="identifier">CharT</span><span class="special">,</span> <span class="identifier">Traits</span> <span class="special">&gt;</span> <span class="special">&amp;</span> os<span class="special">,</span> 
             <span class="keyword">const</span> <a class="link" href="classboost_1_1random_1_1independent__bits__engine.html" title="Class template independent_bits_engine">independent_bits_engine</a> <span class="special">&amp;</span> r<span class="special">)</span><span class="special">;</span></pre>
<p>Writes the textual representation if the generator to a <code class="computeroutput">std::ostream</code>. The textual representation of the engine is the textual representation of the base engine. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> CharT<span class="special">,</span> <span class="keyword">typename</span> Traits<span class="special">&gt;</span> 
  <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_istream</span><span class="special">&lt;</span> <span class="identifier">CharT</span><span class="special">,</span> <span class="identifier">Traits</span> <span class="special">&gt;</span> <span class="special">&amp;</span> 
  <a name="doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1a3b41869e6a87f3ff336b3421195966e5"></a><span class="keyword">operator</span><span class="special">&gt;&gt;</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_istream</span><span class="special">&lt;</span> <span class="identifier">CharT</span><span class="special">,</span> <span class="identifier">Traits</span> <span class="special">&gt;</span> <span class="special">&amp;</span> is<span class="special">,</span> 
             <span class="keyword">const</span> <a class="link" href="classboost_1_1random_1_1independent__bits__engine.html" title="Class template independent_bits_engine">independent_bits_engine</a> <span class="special">&amp;</span> r<span class="special">)</span><span class="special">;</span></pre>
<p>Reads the state of an <code class="computeroutput"><a class="link" href="classboost_1_1random_1_1independent__bits__engine.html" title="Class template independent_bits_engine">independent_bits_engine</a></code> from a <code class="computeroutput">std::istream</code>. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">bool</span> <a name="doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1a75231dbd66015d3a5644a5ff56fae27a"></a><span class="keyword">operator</span><span class="special">==</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="classboost_1_1random_1_1independent__bits__engine.html" title="Class template independent_bits_engine">independent_bits_engine</a> <span class="special">&amp;</span> x<span class="special">,</span> 
                <span class="keyword">const</span> <a class="link" href="classboost_1_1random_1_1independent__bits__engine.html" title="Class template independent_bits_engine">independent_bits_engine</a> <span class="special">&amp;</span> y<span class="special">)</span><span class="special">;</span></pre>
<p>Returns: true iff the two <code class="computeroutput">independent_bits_engines</code> will produce the same sequence of values. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">bool</span> <a name="doxygen.headers.classboost_1_1random_1_1independent__bits__engine_1a91620cd2d6bfd236f946c372a0416564"></a><span class="keyword">operator</span><span class="special">!=</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="classboost_1_1random_1_1independent__bits__engine.html" title="Class template independent_bits_engine">independent_bits_engine</a> <span class="special">&amp;</span> lhs<span class="special">,</span> 
                <span class="keyword">const</span> <a class="link" href="classboost_1_1random_1_1independent__bits__engine.html" title="Class template independent_bits_engine">independent_bits_engine</a> <span class="special">&amp;</span> rhs<span class="special">)</span><span class="special">;</span></pre>
<p>Returns: true iff the two <code class="computeroutput">independent_bits_engines</code> will produce different sequences of values. </p>
</li>
</ol></div>
</div>
</div>
</div>
<div class="copyright-footer">Copyright © 2000-2005 Jens Maurer<br>Copyright © 2009, 2010 Steven Watanabe<br>Copyright © 2022-2025 Matt
      Borland<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="classboost_1_1random_1_1hyperexponential__distribution_1_1param__type.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../boost_random/reference.html#doxygen.headers.independent__bits_8hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="classboost_1_1random_1_1inversive__congruential__engine.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
